Model run by stephane.hess using Apollo 0.3.6 on R 4.5.1 for Darwin. Please acknowledge the use of Apollo by citing Hess & Palma (2019) DOI 10.1016/j.jocm.2019.100170 www.ApolloChoiceModelling.com Model name : NL_two_levels_constraints_on_lambda Model description : Two-level NL model with socio-demographics on mode choice SP data, with constraint on lambda Model run at : 2025-09-19 11:39:28.54297 Estimation method : bfgs Estimation diagnosis : successful convergence Optimisation diagnosis : Maximum found hessian properties : Negative definite maximum eigenvalue : -4.499642 reciprocal of condition number : 4.24434e-08 Number of individuals : 500 Number of rows in database : 7000 Number of modelled outcomes : 7000 Number of cores used : 1 Model without mixing LL(start) : -4830.94 LL at equal shares, LL(0) : -8196.02 LL at observed shares, LL(C) : -6706.94 LL(final) : -4774.55 Rho-squared vs equal shares : 0.4175 Adj.Rho-squared vs equal shares : 0.4153 Rho-squared vs observed shares : 0.2881 Adj.Rho-squared vs observed shares : 0.2859 AIC : 9585.1 BIC : 9708.47 Estimated parameters : 18 Time taken (hh:mm:ss) : 00:00:5.9 pre-estimation : 00:00:0.41 estimation : 00:00:1.08 post-estimation : 00:00:4.41 Iterations : 28 Constrained optimisation: lambda_PT > 0 - 1e-10 lambda_PT < 1 + 1e-10 Estimates: Estimate s.e. t.rat.(0) t.rat(1) Rob.s.e. asc_car 0.000000 NA NA NA NA asc_bus 0.390191 0.436658 0.8936 -1.397 0.421961 asc_air -0.703862 0.301198 -2.3369 -5.657 0.292794 asc_rail -1.666406 0.299914 -5.5563 -8.891 0.288933 asc_bus_interaction_female 0.269697 0.103709 2.6005 -7.042 0.112991 asc_air_interaction_female 0.238206 0.077606 3.0694 -9.816 0.078307 asc_rail_interaction_female 0.179805 0.067784 2.6526 -12.100 0.068429 b_tt_car -0.010496 7.2781e-04 -14.4217 -1388.410 7.2982e-04 b_tt_bus -0.016548 0.001244 -13.3006 -817.078 0.001221 b_tt_air -0.012462 0.002028 -6.1439 -499.155 0.002040 b_tt_rail -0.005175 0.001396 -3.7086 -720.296 0.001354 b_tt_interaction_business -0.006076 5.0779e-04 -11.9658 -1981.289 4.7317e-04 b_access -0.016973 0.002082 -8.1520 -488.450 0.002026 b_cost -0.058409 0.002413 -24.2102 -438.703 0.002459 b_cost_interaction_business 0.024503 0.002280 10.7483 -427.912 0.002140 cost_income_elast -0.603016 0.028929 -20.8445 -55.412 0.029927 b_no_frills 0.000000 NA NA NA NA b_wifi 0.771047 0.047051 16.3876 -4.866 0.048106 b_food 0.329410 0.040593 8.1149 -16.520 0.043124 lambda_PT 0.632427 0.028521 22.1740 -12.888 0.028225 Rob.t.rat.(0) Rob.t.rat.(1) asc_car NA NA asc_bus 0.9247 -1.445 asc_air -2.4039 -5.819 asc_rail -5.7674 -9.228 asc_bus_interaction_female 2.3869 -6.463 asc_air_interaction_female 3.0420 -9.728 asc_rail_interaction_female 2.6276 -11.986 b_tt_car -14.3819 -1384.578 b_tt_bus -13.5495 -832.371 b_tt_air -6.1088 -496.300 b_tt_rail -3.8234 -742.605 b_tt_interaction_business -12.8413 -2126.243 b_access -8.3767 -501.913 b_cost -23.7535 -430.428 b_cost_interaction_business 11.4485 -455.788 cost_income_elast -20.1498 -53.565 b_no_frills NA NA b_wifi 16.0282 -4.759 b_food 7.6388 -15.550 lambda_PT 22.4067 -13.023 Nesting structure for NL model component : Nest: root (1) |----Alternative: car '-Nest: PT (0.6324) |-Alternative: bus |-Alternative: air '-Alternative: rail Overview of choices for NL model component : car bus air rail Times available 5446.00 6314.00 5264.00 6118.00 Times chosen 1946.00 358.00 1522.00 3174.00 Percentage chosen overall 27.80 5.11 21.74 45.34 Percentage chosen when available 35.73 5.67 28.91 51.88 Classical covariance matrix: asc_bus asc_air asc_bus 0.190671 0.036642 asc_air 0.036642 0.090720 asc_rail 0.034185 0.051277 asc_bus_interaction_female -0.006258 -0.001790 asc_air_interaction_female -0.001478 -0.002967 asc_rail_interaction_female -0.001619 -0.001691 b_tt_car 1.0713e-04 1.4425e-04 b_tt_bus -4.2607e-04 3.978e-05 b_tt_air -1.462e-05 -3.6994e-04 b_tt_rail 7.654e-06 7.205e-06 b_tt_interaction_business 6.165e-06 1.038e-05 b_access -1.232e-05 -3.0747e-04 b_cost -1.301e-05 -1.654e-05 b_cost_interaction_business 4.187e-05 -4.339e-05 cost_income_elast -6.3724e-04 9.7069e-04 b_wifi -1.4662e-04 -0.001630 b_food -2.0055e-04 -9.9048e-04 lambda_PT 2.850e-05 -3.0140e-04 asc_rail asc_bus_interaction_female asc_bus 0.034185 -0.006258 asc_air 0.051277 -0.001790 asc_rail 0.089949 -0.001762 asc_bus_interaction_female -0.001762 0.010755 asc_air_interaction_female -0.002029 0.003416 asc_rail_interaction_female -0.002339 0.003290 b_tt_car 1.5241e-04 -1.746e-06 b_tt_bus 5.100e-05 -5.433e-07 b_tt_air -1.463e-06 -2.674e-06 b_tt_rail -2.7407e-04 -1.809e-06 b_tt_interaction_business 1.575e-05 2.470e-07 b_access -1.508e-05 -2.010e-07 b_cost 4.131e-05 -1.483e-05 b_cost_interaction_business -1.602e-05 1.231e-05 cost_income_elast 4.1060e-04 -1.3090e-04 b_wifi -0.002053 1.4695e-04 b_food -0.001334 4.268e-05 lambda_PT -0.001069 1.6940e-04 asc_air_interaction_female asc_rail_interaction_female asc_bus -0.001478 -0.001619 asc_air -0.002967 -0.001691 asc_rail -0.002029 -0.002339 asc_bus_interaction_female 0.003416 0.003290 asc_air_interaction_female 0.006023 0.003677 asc_rail_interaction_female 0.003677 0.004595 b_tt_car -1.347e-06 -6.250e-07 b_tt_bus -2.508e-06 -8.711e-07 b_tt_air -1.325e-06 -1.471e-06 b_tt_rail -5.682e-07 -2.146e-07 b_tt_interaction_business -6.962e-07 -3.135e-07 b_access -3.009e-06 -2.497e-06 b_cost -8.366e-06 -3.966e-06 b_cost_interaction_business 2.519e-06 1.548e-06 cost_income_elast 6.705e-06 -4.837e-06 b_wifi 1.1242e-04 4.107e-05 b_food 4.532e-05 1.397e-05 lambda_PT 8.526e-05 3.383e-05 b_tt_car b_tt_bus asc_bus 1.0713e-04 -4.2607e-04 asc_air 1.4425e-04 3.978e-05 asc_rail 1.5241e-04 5.100e-05 asc_bus_interaction_female -1.746e-06 -5.433e-07 asc_air_interaction_female -1.347e-06 -2.508e-06 asc_rail_interaction_female -6.250e-07 -8.711e-07 b_tt_car 5.297e-07 2.408e-07 b_tt_bus 2.408e-07 1.548e-06 b_tt_air 7.979e-08 1.947e-07 b_tt_rail 3.591e-08 9.186e-08 b_tt_interaction_business -1.853e-08 -3.518e-08 b_access 8.239e-08 9.289e-08 b_cost 7.430e-07 1.266e-06 b_cost_interaction_business -4.930e-07 -9.083e-07 cost_income_elast -2.481e-07 2.364e-06 b_wifi -9.860e-06 -1.493e-05 b_food -4.351e-06 -5.834e-06 lambda_PT -7.123e-06 -1.315e-05 b_tt_air b_tt_rail asc_bus -1.462e-05 7.654e-06 asc_air -3.6994e-04 7.205e-06 asc_rail -1.463e-06 -2.7407e-04 asc_bus_interaction_female -2.674e-06 -1.809e-06 asc_air_interaction_female -1.325e-06 -5.682e-07 asc_rail_interaction_female -1.471e-06 -2.146e-07 b_tt_car 7.979e-08 3.591e-08 b_tt_bus 1.947e-07 9.186e-08 b_tt_air 4.114e-06 -6.939e-08 b_tt_rail -6.939e-08 1.947e-06 b_tt_interaction_business -4.996e-08 -8.314e-08 b_access 1.591e-06 -2.078e-07 b_cost 1.390e-06 8.687e-07 b_cost_interaction_business -4.593e-07 -5.913e-07 cost_income_elast -6.543e-06 -2.094e-06 b_wifi -1.286e-05 -9.150e-06 b_food -6.843e-06 -3.892e-06 lambda_PT -1.176e-05 -5.178e-06 b_tt_interaction_business b_access asc_bus 6.165e-06 -1.232e-05 asc_air 1.038e-05 -3.0747e-04 asc_rail 1.575e-05 -1.508e-05 asc_bus_interaction_female 2.470e-07 -2.010e-07 asc_air_interaction_female -6.962e-07 -3.009e-06 asc_rail_interaction_female -3.135e-07 -2.497e-06 b_tt_car -1.853e-08 8.239e-08 b_tt_bus -3.518e-08 9.289e-08 b_tt_air -4.996e-08 1.591e-06 b_tt_rail -8.314e-08 -2.078e-07 b_tt_interaction_business 2.578e-07 6.099e-08 b_access 6.099e-08 4.335e-06 b_cost -2.161e-07 1.181e-06 b_cost_interaction_business 7.185e-07 -9.667e-08 cost_income_elast 4.875e-07 -5.231e-06 b_wifi -2.154e-06 -1.411e-05 b_food -8.622e-07 -6.767e-06 lambda_PT -6.143e-07 -1.267e-05 b_cost b_cost_interaction_business asc_bus -1.301e-05 4.187e-05 asc_air -1.654e-05 -4.339e-05 asc_rail 4.131e-05 -1.602e-05 asc_bus_interaction_female -1.483e-05 1.231e-05 asc_air_interaction_female -8.366e-06 2.519e-06 asc_rail_interaction_female -3.966e-06 1.548e-06 b_tt_car 7.430e-07 -4.930e-07 b_tt_bus 1.266e-06 -9.083e-07 b_tt_air 1.390e-06 -4.593e-07 b_tt_rail 8.687e-07 -5.913e-07 b_tt_interaction_business -2.161e-07 7.185e-07 b_access 1.181e-06 -9.667e-08 b_cost 5.821e-06 -3.768e-06 b_cost_interaction_business -3.768e-06 5.197e-06 cost_income_elast -1.471e-05 2.927e-06 b_wifi -5.625e-05 2.039e-05 b_food -2.423e-05 7.779e-06 lambda_PT -4.982e-05 2.472e-05 cost_income_elast b_wifi asc_bus -6.3724e-04 -1.4662e-04 asc_air 9.7069e-04 -0.001630 asc_rail 4.1060e-04 -0.002053 asc_bus_interaction_female -1.3090e-04 1.4695e-04 asc_air_interaction_female 6.705e-06 1.1242e-04 asc_rail_interaction_female -4.837e-06 4.107e-05 b_tt_car -2.481e-07 -9.860e-06 b_tt_bus 2.364e-06 -1.493e-05 b_tt_air -6.543e-06 -1.286e-05 b_tt_rail -2.094e-06 -9.150e-06 b_tt_interaction_business 4.875e-07 -2.154e-06 b_access -5.231e-06 -1.411e-05 b_cost -1.471e-05 -5.625e-05 b_cost_interaction_business 2.927e-06 2.039e-05 cost_income_elast 8.3690e-04 6.765e-05 b_wifi 6.765e-05 0.002214 b_food 6.074e-05 0.001109 lambda_PT -1.622e-05 6.7985e-04 b_food lambda_PT asc_bus -2.0055e-04 2.850e-05 asc_air -9.9048e-04 -3.0140e-04 asc_rail -0.001334 -0.001069 asc_bus_interaction_female 4.268e-05 1.6940e-04 asc_air_interaction_female 4.532e-05 8.526e-05 asc_rail_interaction_female 1.397e-05 3.383e-05 b_tt_car -4.351e-06 -7.123e-06 b_tt_bus -5.834e-06 -1.315e-05 b_tt_air -6.843e-06 -1.176e-05 b_tt_rail -3.892e-06 -5.178e-06 b_tt_interaction_business -8.622e-07 -6.143e-07 b_access -6.767e-06 -1.267e-05 b_cost -2.423e-05 -4.982e-05 b_cost_interaction_business 7.779e-06 2.472e-05 cost_income_elast 6.074e-05 -1.622e-05 b_wifi 0.001109 6.7985e-04 b_food 0.001648 2.6222e-04 lambda_PT 2.6222e-04 8.1345e-04 Robust covariance matrix: asc_bus asc_air asc_bus 0.178051 0.030533 asc_air 0.030533 0.085728 asc_rail 0.032687 0.048894 asc_bus_interaction_female -0.005583 -0.001358 asc_air_interaction_female 0.001044 -0.002314 asc_rail_interaction_female -6.5229e-04 -0.001137 b_tt_car 1.0158e-04 1.3873e-04 b_tt_bus -3.9751e-04 4.926e-05 b_tt_air -1.990e-05 -3.4308e-04 b_tt_rail -1.912e-06 7.268e-06 b_tt_interaction_business 1.598e-05 2.016e-05 b_access 7.345e-05 -2.8839e-04 b_cost -2.170e-05 -9.180e-06 b_cost_interaction_business 8.994e-05 -4.251e-05 cost_income_elast -9.8354e-04 0.001283 b_wifi -0.001314 -0.001573 b_food 4.744e-05 -9.3300e-04 lambda_PT -3.1515e-04 -1.2057e-04 asc_rail asc_bus_interaction_female asc_bus 0.032687 -0.005583 asc_air 0.048894 -0.001358 asc_rail 0.083483 -8.4812e-04 asc_bus_interaction_female -8.4812e-04 0.012767 asc_air_interaction_female -0.002886 0.003309 asc_rail_interaction_female -0.001633 0.003650 b_tt_car 1.4530e-04 -1.899e-07 b_tt_bus 4.486e-05 -3.447e-06 b_tt_air 9.770e-06 1.239e-05 b_tt_rail -2.4547e-04 -3.134e-06 b_tt_interaction_business 2.793e-05 1.249e-06 b_access -2.076e-05 -9.275e-06 b_cost 3.165e-05 -2.373e-05 b_cost_interaction_business 2.486e-05 1.517e-05 cost_income_elast 8.0047e-04 2.7831e-04 b_wifi -0.001765 1.0985e-04 b_food -0.001099 2.7982e-04 lambda_PT -9.8039e-04 2.8870e-04 asc_air_interaction_female asc_rail_interaction_female asc_bus 0.001044 -6.5229e-04 asc_air -0.002314 -0.001137 asc_rail -0.002886 -0.001633 asc_bus_interaction_female 0.003309 0.003650 asc_air_interaction_female 0.006132 0.003940 asc_rail_interaction_female 0.003940 0.004683 b_tt_car -2.158e-06 1.279e-06 b_tt_bus -9.466e-06 -1.873e-06 b_tt_air -2.154e-06 3.396e-06 b_tt_rail 7.035e-06 1.650e-06 b_tt_interaction_business 2.753e-07 4.604e-07 b_access -7.341e-06 -3.024e-06 b_cost -1.893e-05 -9.402e-06 b_cost_interaction_business 1.408e-05 1.170e-05 cost_income_elast 1.8302e-04 1.6658e-04 b_wifi -4.345e-05 -6.838e-05 b_food -1.6357e-04 -8.021e-05 lambda_PT 1.0723e-04 3.909e-05 b_tt_car b_tt_bus asc_bus 1.0158e-04 -3.9751e-04 asc_air 1.3873e-04 4.926e-05 asc_rail 1.4530e-04 4.486e-05 asc_bus_interaction_female -1.899e-07 -3.447e-06 asc_air_interaction_female -2.158e-06 -9.466e-06 asc_rail_interaction_female 1.279e-06 -1.873e-06 b_tt_car 5.326e-07 2.581e-07 b_tt_bus 2.581e-07 1.491e-06 b_tt_air 1.561e-07 2.685e-07 b_tt_rail 8.423e-08 1.819e-07 b_tt_interaction_business 3.682e-09 -4.770e-08 b_access 9.005e-08 -1.143e-07 b_cost 7.837e-07 1.347e-06 b_cost_interaction_business -4.713e-07 -1.018e-06 cost_income_elast 6.707e-07 3.190e-06 b_wifi -9.918e-06 -1.191e-05 b_food -5.036e-06 -7.813e-06 lambda_PT -7.013e-06 -1.197e-05 b_tt_air b_tt_rail asc_bus -1.990e-05 -1.912e-06 asc_air -3.4308e-04 7.268e-06 asc_rail 9.770e-06 -2.4547e-04 asc_bus_interaction_female 1.239e-05 -3.134e-06 asc_air_interaction_female -2.154e-06 7.035e-06 asc_rail_interaction_female 3.396e-06 1.650e-06 b_tt_car 1.561e-07 8.423e-08 b_tt_bus 2.685e-07 1.819e-07 b_tt_air 4.162e-06 3.514e-08 b_tt_rail 3.514e-08 1.832e-06 b_tt_interaction_business -7.141e-08 -1.184e-07 b_access 1.475e-06 -1.541e-07 b_cost 1.385e-06 1.003e-06 b_cost_interaction_business -3.465e-07 -8.363e-07 cost_income_elast -7.955e-06 -3.409e-06 b_wifi -1.661e-05 -1.158e-05 b_food -1.108e-05 -6.847e-06 lambda_PT -1.322e-05 -5.274e-06 b_tt_interaction_business b_access asc_bus 1.598e-05 7.345e-05 asc_air 2.016e-05 -2.8839e-04 asc_rail 2.793e-05 -2.076e-05 asc_bus_interaction_female 1.249e-06 -9.275e-06 asc_air_interaction_female 2.753e-07 -7.341e-06 asc_rail_interaction_female 4.604e-07 -3.024e-06 b_tt_car 3.682e-09 9.005e-08 b_tt_bus -4.770e-08 -1.143e-07 b_tt_air -7.141e-08 1.475e-06 b_tt_rail -1.184e-07 -1.541e-07 b_tt_interaction_business 2.239e-07 5.907e-08 b_access 5.907e-08 4.105e-06 b_cost -2.378e-07 1.234e-06 b_cost_interaction_business 5.569e-07 -1.431e-07 cost_income_elast 6.122e-07 -4.246e-06 b_wifi -2.555e-06 -9.183e-06 b_food -1.122e-06 -4.226e-06 lambda_PT -8.217e-07 -1.299e-05 b_cost b_cost_interaction_business asc_bus -2.170e-05 8.994e-05 asc_air -9.180e-06 -4.251e-05 asc_rail 3.165e-05 2.486e-05 asc_bus_interaction_female -2.373e-05 1.517e-05 asc_air_interaction_female -1.893e-05 1.408e-05 asc_rail_interaction_female -9.402e-06 1.170e-05 b_tt_car 7.837e-07 -4.713e-07 b_tt_bus 1.347e-06 -1.018e-06 b_tt_air 1.385e-06 -3.465e-07 b_tt_rail 1.003e-06 -8.363e-07 b_tt_interaction_business -2.378e-07 5.569e-07 b_access 1.234e-06 -1.431e-07 b_cost 6.047e-06 -3.870e-06 b_cost_interaction_business -3.870e-06 4.581e-06 cost_income_elast -1.685e-05 2.960e-06 b_wifi -5.632e-05 2.176e-05 b_food -2.751e-05 9.883e-06 lambda_PT -5.120e-05 2.445e-05 cost_income_elast b_wifi asc_bus -9.8354e-04 -0.001314 asc_air 0.001283 -0.001573 asc_rail 8.0047e-04 -0.001765 asc_bus_interaction_female 2.7831e-04 1.0985e-04 asc_air_interaction_female 1.8302e-04 -4.345e-05 asc_rail_interaction_female 1.6658e-04 -6.838e-05 b_tt_car 6.707e-07 -9.918e-06 b_tt_bus 3.190e-06 -1.191e-05 b_tt_air -7.955e-06 -1.661e-05 b_tt_rail -3.409e-06 -1.158e-05 b_tt_interaction_business 6.122e-07 -2.555e-06 b_access -4.246e-06 -9.183e-06 b_cost -1.685e-05 -5.632e-05 b_cost_interaction_business 2.960e-06 2.176e-05 cost_income_elast 8.9560e-04 8.198e-05 b_wifi 8.198e-05 0.002314 b_food 3.597e-06 0.001214 lambda_PT 6.665e-05 6.2623e-04 b_food lambda_PT asc_bus 4.744e-05 -3.1515e-04 asc_air -9.3300e-04 -1.2057e-04 asc_rail -0.001099 -9.8039e-04 asc_bus_interaction_female 2.7982e-04 2.8870e-04 asc_air_interaction_female -1.6357e-04 1.0723e-04 asc_rail_interaction_female -8.021e-05 3.909e-05 b_tt_car -5.036e-06 -7.013e-06 b_tt_bus -7.813e-06 -1.197e-05 b_tt_air -1.108e-05 -1.322e-05 b_tt_rail -6.847e-06 -5.274e-06 b_tt_interaction_business -1.122e-06 -8.217e-07 b_access -4.226e-06 -1.299e-05 b_cost -2.751e-05 -5.120e-05 b_cost_interaction_business 9.883e-06 2.445e-05 cost_income_elast 3.597e-06 6.665e-05 b_wifi 0.001214 6.2623e-04 b_food 0.001860 2.8581e-04 lambda_PT 2.8581e-04 7.9664e-04 Classical correlation matrix: asc_bus asc_air asc_bus 1.000000 0.27860 asc_air 0.278601 1.00000 asc_rail 0.261036 0.56764 asc_bus_interaction_female -0.138194 -0.05731 asc_air_interaction_female -0.043621 -0.12694 asc_rail_interaction_female -0.054696 -0.08283 b_tt_car 0.337093 0.65802 b_tt_bus -0.784295 0.10616 b_tt_air -0.016503 -0.60553 b_tt_rail 0.012561 0.01714 b_tt_interaction_business 0.027802 0.06785 b_access -0.013552 -0.49029 b_cost -0.012353 -0.02276 b_cost_interaction_business 0.042060 -0.06319 cost_income_elast -0.050446 0.11140 b_wifi -0.007136 -0.11502 b_food -0.011314 -0.08101 lambda_PT 0.002288 -0.03508 asc_rail asc_bus_interaction_female asc_bus 0.261036 -0.138194 asc_air 0.567643 -0.057309 asc_rail 1.000000 -0.056636 asc_bus_interaction_female -0.056636 1.000000 asc_air_interaction_female -0.087158 0.424491 asc_rail_interaction_female -0.115053 0.467938 b_tt_car 0.698238 -0.023137 b_tt_bus 0.136678 -0.004210 b_tt_air -0.002406 -0.012710 b_tt_rail -0.654828 -0.012501 b_tt_interaction_business 0.103419 0.004689 b_access -0.024149 -9.3097e-04 b_cost 0.057087 -0.059276 b_cost_interaction_business -0.023428 0.052084 cost_income_elast 0.047324 -0.043629 b_wifi -0.145493 0.030115 b_food -0.109544 0.010139 lambda_PT -0.124961 0.057270 asc_air_interaction_female asc_rail_interaction_female asc_bus -0.043621 -0.054696 asc_air -0.126936 -0.082830 asc_rail -0.087158 -0.115053 asc_bus_interaction_female 0.424491 0.467938 asc_air_interaction_female 1.000000 0.698998 asc_rail_interaction_female 0.698998 1.000000 b_tt_car -0.023842 -0.012668 b_tt_bus -0.025974 -0.010329 b_tt_air -0.008419 -0.010701 b_tt_rail -0.005247 -0.002268 b_tt_interaction_business -0.017667 -0.009108 b_access -0.018622 -0.017695 b_cost -0.044684 -0.024249 b_cost_interaction_business 0.014240 0.010018 cost_income_elast 0.002986 -0.002467 b_wifi 0.030787 0.012878 b_food 0.014385 0.005076 lambda_PT 0.038520 0.017497 b_tt_car b_tt_bus asc_bus 0.33709 -0.784295 asc_air 0.65802 0.106155 asc_rail 0.69824 0.136678 asc_bus_interaction_female -0.02314 -0.004210 asc_air_interaction_female -0.02384 -0.025974 asc_rail_interaction_female -0.01267 -0.010329 b_tt_car 1.00000 0.265906 b_tt_bus 0.26591 1.000000 b_tt_air 0.05405 0.077141 b_tt_rail 0.03536 0.052910 b_tt_interaction_business -0.05015 -0.055686 b_access 0.05437 0.035861 b_cost 0.42315 0.421723 b_cost_interaction_business -0.29713 -0.320239 cost_income_elast -0.01178 0.065681 b_wifi -0.28794 -0.255006 b_food -0.14726 -0.115510 lambda_PT -0.34316 -0.370685 b_tt_air b_tt_rail asc_bus -0.016503 0.012561 asc_air -0.605533 0.017142 asc_rail -0.002406 -0.654828 asc_bus_interaction_female -0.012710 -0.012501 asc_air_interaction_female -0.008419 -0.005247 asc_rail_interaction_female -0.010701 -0.002268 b_tt_car 0.054052 0.035358 b_tt_bus 0.077141 0.052910 b_tt_air 1.000000 -0.024516 b_tt_rail -0.024516 1.000000 b_tt_interaction_business -0.048504 -0.117329 b_access 0.376822 -0.071534 b_cost 0.283997 0.258022 b_cost_interaction_business -0.099327 -0.185881 cost_income_elast -0.111507 -0.051871 b_wifi -0.134792 -0.139360 b_food -0.083104 -0.068712 lambda_PT -0.203257 -0.130096 b_tt_interaction_business b_access asc_bus 0.027802 -0.01355 asc_air 0.067850 -0.49029 asc_rail 0.103419 -0.02415 asc_bus_interaction_female 0.004689 -9.3097e-04 asc_air_interaction_female -0.017667 -0.01862 asc_rail_interaction_female -0.009108 -0.01769 b_tt_car -0.050151 0.05437 b_tt_bus -0.055686 0.03586 b_tt_air -0.048504 0.37682 b_tt_rail -0.117329 -0.07153 b_tt_interaction_business 1.000000 0.05769 b_access 0.057689 1.00000 b_cost -0.176411 0.23514 b_cost_interaction_business 0.620667 -0.02037 cost_income_elast 0.033184 -0.08685 b_wifi -0.090171 -0.14407 b_food -0.041826 -0.08007 lambda_PT -0.042416 -0.21344 b_cost b_cost_interaction_business asc_bus -0.01235 0.04206 asc_air -0.02276 -0.06319 asc_rail 0.05709 -0.02343 asc_bus_interaction_female -0.05928 0.05208 asc_air_interaction_female -0.04468 0.01424 asc_rail_interaction_female -0.02425 0.01002 b_tt_car 0.42315 -0.29713 b_tt_bus 0.42172 -0.32024 b_tt_air 0.28400 -0.09933 b_tt_rail 0.25802 -0.18588 b_tt_interaction_business -0.17641 0.62067 b_access 0.23514 -0.02037 b_cost 1.00000 -0.68511 b_cost_interaction_business -0.68511 1.00000 cost_income_elast -0.21078 0.04438 b_wifi -0.49554 0.19005 b_food -0.24739 0.08406 lambda_PT -0.72402 0.38014 cost_income_elast b_wifi asc_bus -0.050446 -0.007136 asc_air 0.111401 -0.115022 asc_rail 0.047324 -0.145493 asc_bus_interaction_female -0.043629 0.030115 asc_air_interaction_female 0.002986 0.030787 asc_rail_interaction_female -0.002467 0.012878 b_tt_car -0.011781 -0.287943 b_tt_bus 0.065681 -0.255006 b_tt_air -0.111507 -0.134792 b_tt_rail -0.051871 -0.139360 b_tt_interaction_business 0.033184 -0.090171 b_access -0.086846 -0.144065 b_cost -0.210784 -0.495541 b_cost_interaction_business 0.044382 0.190054 cost_income_elast 1.000000 0.049704 b_wifi 0.049704 1.000000 b_food 0.051721 0.580401 lambda_PT -0.019656 0.506619 b_food lambda_PT asc_bus -0.011314 0.002288 asc_air -0.081010 -0.035085 asc_rail -0.109544 -0.124961 asc_bus_interaction_female 0.010139 0.057270 asc_air_interaction_female 0.014385 0.038520 asc_rail_interaction_female 0.005076 0.017497 b_tt_car -0.147257 -0.343155 b_tt_bus -0.115510 -0.370685 b_tt_air -0.083104 -0.203257 b_tt_rail -0.068712 -0.130096 b_tt_interaction_business -0.041826 -0.042416 b_access -0.080071 -0.213444 b_cost -0.247386 -0.724016 b_cost_interaction_business 0.084061 0.380142 cost_income_elast 0.051721 -0.019656 b_wifi 0.580401 0.506619 b_food 1.000000 0.226488 lambda_PT 0.226488 1.000000 Robust correlation matrix: asc_bus asc_air asc_bus 1.000000 0.24714 asc_air 0.247136 1.00000 asc_rail 0.268109 0.57796 asc_bus_interaction_female -0.117099 -0.04105 asc_air_interaction_female 0.031587 -0.10091 asc_rail_interaction_female -0.022591 -0.05675 b_tt_car 0.329848 0.64922 b_tt_bus -0.771368 0.13776 b_tt_air -0.023116 -0.57438 b_tt_rail -0.003347 0.01834 b_tt_interaction_business 0.080013 0.14551 b_access 0.085911 -0.48611 b_cost -0.020912 -0.01275 b_cost_interaction_business 0.099590 -0.06784 cost_income_elast -0.077887 0.14644 b_wifi -0.064710 -0.11166 b_food 0.002607 -0.07389 lambda_PT -0.026461 -0.01459 asc_rail asc_bus_interaction_female asc_bus 0.26811 -0.117099 asc_air 0.57796 -0.041050 asc_rail 1.00000 -0.025978 asc_bus_interaction_female -0.02598 1.000000 asc_air_interaction_female -0.12756 0.374033 asc_rail_interaction_female -0.08259 0.472117 b_tt_car 0.68905 -0.002303 b_tt_bus 0.12712 -0.024977 b_tt_air 0.01657 0.053747 b_tt_rail -0.62764 -0.020491 b_tt_interaction_business 0.20431 0.023366 b_access -0.03546 -0.040510 b_cost 0.04455 -0.085406 b_cost_interaction_business 0.04021 0.062721 cost_income_elast 0.09257 0.082307 b_wifi -0.12699 0.020209 b_food -0.08823 0.057428 lambda_PT -0.12022 0.090524 asc_air_interaction_female asc_rail_interaction_female asc_bus 0.031587 -0.02259 asc_air -0.100913 -0.05675 asc_rail -0.127563 -0.08259 asc_bus_interaction_female 0.374033 0.47212 asc_air_interaction_female 1.000000 0.73536 asc_rail_interaction_female 0.735356 1.00000 b_tt_car -0.037755 0.02561 b_tt_bus -0.098983 -0.02241 b_tt_air -0.013486 0.02433 b_tt_rail 0.066372 0.01781 b_tt_interaction_business 0.007430 0.01422 b_access -0.046265 -0.02181 b_cost -0.098296 -0.05588 b_cost_interaction_business 0.084041 0.07991 cost_income_elast 0.078097 0.08134 b_wifi -0.011536 -0.02077 b_food -0.048440 -0.02718 lambda_PT 0.048516 0.02024 b_tt_car b_tt_bus asc_bus 0.329848 -0.77137 asc_air 0.649217 0.13776 asc_rail 0.689045 0.12712 asc_bus_interaction_female -0.002303 -0.02498 asc_air_interaction_female -0.037755 -0.09898 asc_rail_interaction_female 0.025609 -0.02241 b_tt_car 1.000000 0.28961 b_tt_bus 0.289612 1.00000 b_tt_air 0.104861 0.10778 b_tt_rail 0.085265 0.11001 b_tt_interaction_business 0.010661 -0.08255 b_access 0.060894 -0.04618 b_cost 0.436711 0.44847 b_cost_interaction_business -0.301748 -0.38941 cost_income_elast 0.030710 0.08727 b_wifi -0.282500 -0.20266 b_food -0.159997 -0.14835 lambda_PT -0.340451 -0.34723 b_tt_air b_tt_rail asc_bus -0.02312 -0.003347 asc_air -0.57438 0.018340 asc_rail 0.01657 -0.627642 asc_bus_interaction_female 0.05375 -0.020491 asc_air_interaction_female -0.01349 0.066372 asc_rail_interaction_female 0.02433 0.017813 b_tt_car 0.10486 0.085265 b_tt_bus 0.10778 0.110009 b_tt_air 1.00000 0.012727 b_tt_rail 0.01273 1.000000 b_tt_interaction_business -0.07398 -0.184815 b_access 0.35684 -0.056188 b_cost 0.27603 0.301196 b_cost_interaction_business -0.07937 -0.288684 cost_income_elast -0.13031 -0.084167 b_wifi -0.16929 -0.177805 b_food -0.12589 -0.117303 lambda_PT -0.22956 -0.138053 b_tt_interaction_business b_access asc_bus 0.080013 0.08591 asc_air 0.145513 -0.48611 asc_rail 0.204310 -0.03546 asc_bus_interaction_female 0.023366 -0.04051 asc_air_interaction_female 0.007430 -0.04626 asc_rail_interaction_female 0.014218 -0.02181 b_tt_car 0.010661 0.06089 b_tt_bus -0.082548 -0.04618 b_tt_air -0.073982 0.35684 b_tt_rail -0.184815 -0.05619 b_tt_interaction_business 1.000000 0.06162 b_access 0.061616 1.00000 b_cost -0.204419 0.24761 b_cost_interaction_business 0.549875 -0.03299 cost_income_elast 0.043234 -0.07002 b_wifi -0.112265 -0.09421 b_food -0.055006 -0.04836 lambda_PT -0.061524 -0.22714 b_cost b_cost_interaction_business asc_bus -0.02091 0.09959 asc_air -0.01275 -0.06784 asc_rail 0.04455 0.04021 asc_bus_interaction_female -0.08541 0.06272 asc_air_interaction_female -0.09830 0.08404 asc_rail_interaction_female -0.05588 0.07991 b_tt_car 0.43671 -0.30175 b_tt_bus 0.44847 -0.38941 b_tt_air 0.27603 -0.07937 b_tt_rail 0.30120 -0.28868 b_tt_interaction_business -0.20442 0.54988 b_access 0.24761 -0.03299 b_cost 1.00000 -0.73535 b_cost_interaction_business -0.73535 1.00000 cost_income_elast -0.22899 0.04622 b_wifi -0.47613 0.21137 b_food -0.25941 0.10708 lambda_PT -0.73768 0.40471 cost_income_elast b_wifi asc_bus -0.077887 -0.06471 asc_air 0.146442 -0.11166 asc_rail 0.092574 -0.12699 asc_bus_interaction_female 0.082307 0.02021 asc_air_interaction_female 0.078097 -0.01154 asc_rail_interaction_female 0.081342 -0.02077 b_tt_car 0.030710 -0.28250 b_tt_bus 0.087275 -0.20266 b_tt_air -0.130306 -0.16929 b_tt_rail -0.084167 -0.17780 b_tt_interaction_business 0.043234 -0.11226 b_access -0.070021 -0.09421 b_cost -0.228987 -0.47613 b_cost_interaction_business 0.046221 0.21137 cost_income_elast 1.000000 0.05694 b_wifi 0.056943 1.00000 b_food 0.002787 0.58540 lambda_PT 0.078904 0.46121 b_food lambda_PT asc_bus 0.002607 -0.02646 asc_air -0.073893 -0.01459 asc_rail -0.088231 -0.12022 asc_bus_interaction_female 0.057428 0.09052 asc_air_interaction_female -0.048440 0.04852 asc_rail_interaction_female -0.027181 0.02024 b_tt_car -0.159997 -0.34045 b_tt_bus -0.148346 -0.34723 b_tt_air -0.125891 -0.22956 b_tt_rail -0.117303 -0.13805 b_tt_interaction_business -0.055006 -0.06152 b_access -0.048363 -0.22714 b_cost -0.259411 -0.73768 b_cost_interaction_business 0.107083 0.40471 cost_income_elast 0.002787 0.07890 b_wifi 0.585403 0.46121 b_food 1.000000 0.23482 lambda_PT 0.234818 1.00000 20 most extreme outliers in terms of lowest average per choice prediction: ID Avg prob per choice 464 0.2315134 293 0.2341945 400 0.2350195 146 0.2625510 181 0.2693505 367 0.2733207 317 0.2755059 276 0.2769903 186 0.2886298 434 0.2896036 147 0.2906720 142 0.2914498 307 0.2927481 161 0.2939943 370 0.2942650 447 0.2982689 441 0.3004616 183 0.3005769 259 0.3026362 379 0.3051650 Settings and functions used in model definition: apollo_control -------------- Value modelDescr "Two-level NL model with socio-demographics on mode choice SP data, with constraint on lambda" indivID "ID" outputDirectory "output/" debug "FALSE" modelName "NL_two_levels_constraints_on_lambda" nCores "1" workInLogs "FALSE" seed "13" mixing "FALSE" HB "FALSE" noValidation "FALSE" noDiagnostics "FALSE" calculateLLC "TRUE" analyticHessian "FALSE" memorySaver "FALSE" panelData "TRUE" analyticGrad "TRUE" analyticGrad_manualSet "FALSE" overridePanel "FALSE" preventOverridePanel "FALSE" noModification "FALSE" Hessian routines attempted -------------------------- numerical jacobian of LL analytical gradient Scaling used in computing Hessian --------------------------------- Value asc_bus 0.390191403 asc_air 0.703862283 asc_rail 1.666405920 asc_bus_interaction_female 0.269696929 asc_air_interaction_female 0.238205949 asc_rail_interaction_female 0.179805258 b_tt_car 0.010496242 b_tt_bus 0.016547604 b_tt_air 0.012461987 b_tt_rail 0.005175295 b_tt_interaction_business 0.006076112 b_access 0.016972844 b_cost 0.058409174 b_cost_interaction_business 0.024502611 cost_income_elast 0.603015598 b_wifi 0.771047259 b_food 0.329410499 lambda_PT 0.632426722 apollo_probabilities ---------------------- function(apollo_beta, apollo_inputs, functionality="estimate"){ ### Attach inputs and detach after function exit apollo_attach(apollo_beta, apollo_inputs) on.exit(apollo_detach(apollo_beta, apollo_inputs)) ### Create list of probabilities P P = list() ### Create alternative specific constants and coefficients using interactions with socio-demographics asc_bus_value = asc_bus + asc_bus_interaction_female * female asc_air_value = asc_air + asc_air_interaction_female * female asc_rail_value = asc_rail + asc_rail_interaction_female * female b_tt_car_value = b_tt_car + b_tt_interaction_business * business b_tt_bus_value = b_tt_bus + b_tt_interaction_business * business b_tt_air_value = b_tt_air + b_tt_interaction_business * business b_tt_rail_value = b_tt_rail + b_tt_interaction_business * business b_cost_value = ( b_cost + b_cost_interaction_business * business ) * ( income / mean_income ) ^ cost_income_elast ### List of utilities: these must use the same names as in nl_settings, order is irrelevant V = list() V[["car"]] = asc_car + b_tt_car_value * time_car + b_cost_value * cost_car V[["bus"]] = asc_bus_value + b_tt_bus_value * time_bus + b_access * access_bus + b_cost_value * cost_bus V[["air"]] = asc_air_value + b_tt_air_value * time_air + b_access * access_air + b_cost_value * cost_air + b_no_frills * ( service_air == 1 ) + b_wifi * ( service_air == 2 ) + b_food * ( service_air == 3 ) V[["rail"]] = asc_rail_value + b_tt_rail_value * time_rail + b_access * access_rail + b_cost_value * cost_rail + b_no_frills * ( service_rail == 1 ) + b_wifi * ( service_rail == 2 ) + b_food * ( service_rail == 3 ) ### Specify nests for NL model nlNests = list(root=1, PT=lambda_PT) ### Specify tree structure for NL model nlStructure= list() nlStructure[["root"]] = c("car","PT") nlStructure[["PT"]] = c("bus","air","rail") ### Define settings for NL model nl_settings = list( alternatives = c(car=1, bus=2, air=3, rail=4), avail = list(car=av_car, bus=av_bus, air=av_air, rail=av_rail), choiceVar = choice, utilities = V, nlNests = nlNests, nlStructure = nlStructure ) ### Compute probabilities using NL model P[["model"]] = apollo_nl(nl_settings, functionality) ### Take product across observation for same individual P = apollo_panelProd(P, apollo_inputs, functionality) ### Prepare and return outputs of function P = apollo_prepareProb(P, apollo_inputs, functionality) return(P) }